import numpy as np
import cv2 as cv
# 鼠标回调函数
# 左键双击生成圆形
def draw_circle(event,x,y,flags,param,img):
    if event == cv.EVENT_LBUTTONDBLCLK:
        cv.circle(img,(x,y),100,(255,0,0),-1)
# 右键双击生成矩形

def draw_rectangle(event,x,y,flags,param,img):
    if event == cv.EVENT_RBUTTONDBLCLK:
        cv.rectangle(img,(x,y),(x+50,y+50),(0,255,0),-1)